package com.whnk.pm.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.whnk.pm.mapper.BusitripInfoMapper;
import com.whnk.pm.domain.BusitripInfo;
import com.whnk.pm.service.IBusitripInfoService;
import com.whnk.common.support.Convert;

/**
 * 出差 服务层实现
 * 
 * @author whwhnk
 * @date 2019-08-16
 */
@Service
public class BusitripInfoServiceImpl implements IBusitripInfoService 
{
	@Autowired
	private BusitripInfoMapper busitripInfoMapper;

	/**
     * 查询出差信息
     * 
     * @param busiId 出差ID
     * @return 出差信息
     */
    @Override
	public BusitripInfo selectBusitripInfoById(Integer busiId)
	{
	    return busitripInfoMapper.selectBusitripInfoById(busiId);
	}
	
	/**
     * 查询出差列表
     * 
     * @param busitripInfo 出差信息
     * @return 出差集合
     */
	@Override
	public List<BusitripInfo> selectBusitripInfoList(BusitripInfo busitripInfo)
	{
	    return busitripInfoMapper.selectBusitripInfoList(busitripInfo);
	}
	
    /**
     * 新增出差
     * 
     * @param busitripInfo 出差信息
     * @return 结果
     */
	@Override
	public int insertBusitripInfo(BusitripInfo busitripInfo)
	{
	    return busitripInfoMapper.insertBusitripInfo(busitripInfo);
	}
	
	/**
     * 修改出差
     * 
     * @param busitripInfo 出差信息
     * @return 结果
     */
	@Override
	public int updateBusitripInfo(BusitripInfo busitripInfo)
	{
	    return busitripInfoMapper.updateBusitripInfo(busitripInfo);
	}

	/**
     * 删除出差对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBusitripInfoByIds(String ids)
	{
		return busitripInfoMapper.deleteBusitripInfoByIds(Convert.toStrArray(ids));
	}
	
}
